{include file="public/header"/}
{include file="public/navleft"}
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        报告列表
    </div>
    <ol class="am-breadcrumb">
        <li><a href="{:url('report/blindex')}" class="am-icon-home">首页</a></li>
        <li><a href="{:url('report/blindex')}">报告列表</a></li>
        <li class="am-active">报告查询</li>
    </ol>
    <button
            type="button"
            class="am-btn am-btn-primary"
            data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 400, height: 115}">
        Modal
    </button>
    <div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">Modal
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd">
                T_bljbxxb   -->  Finterid  --> blbh ->t_log_bl
                *****************************************************************
                T_tctbgd    -->  Finterid  --> xbblxh ->t_log_TCT
            </div>
        </div>
    </div>
    <div class="tpl-portlet-components">
        <div class="tpl-block">
            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-3">
                </div>
            </div>
            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form" method="post" action="{:url('report/DetailBlReportInfo')}">
                        <div class="am-u-sm-12 am-u-md-8 container">
                            <div class="am-input-group am-input-group-sm">
                                <input type="text" class="am-form-field" placeholder="千麦条码**姓名**BL 编号**医院条码" name="str">
                                <span class="am-input-group-btn">
            <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="submit" ></button>
          </span>
                            </div>
                        </div>
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th class="table-title">条码</th>
                                <th class="table-author ">Bl编号|blbh</th>
                                <th class="table-type">姓名</th>
                                <th class="table-title">接收日期|jstime</th>
                                <th class="table-title">报告日期|bgtime</th>
                                <th class="table-date ">送检医院|sjhospital</th>
                                <th class="table-title">状态|issh</th>
                                <th class="table-set">操作</th>
                                <th class="hidden">1</th>
                            </tr>
                            </thead>
                            <tbody>
                            {empty name="ReportRes"}
                            {else /}
                            {volist name="ReportRes" id="data"}
                            <tr>
                                <td>{$data.ybid|default='610000123456'}</td>
                                <td>{$data.blbh|default='666'}</td>
                                <td>{$data.brxm|default='zAc'}</td>
                                <td class="am-hide-sm-only">{$data.jstime|getDateDay|default='2020-01-02 07:28:47'}</td>
                                <td class="am-hide-sm-only">{$data.bgtime|getDateDay|default='2020-01-02 07:28:47'}</td>
                                <td>{$data.sjhospital|default='zAc'}</td>
                                <td class="table-title"><a href="#">{$data.issh}</a></td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <button class="am-btn am-btn-default "
                                                    type="button"
                                                    onclick="ModifyBlReportByYbid('{$data.ybid}')">

                                                <span class="am-icon-pencil-square-o"></span> 信息结果编辑
                                            </button>

                                            <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" id="aa"
                                                    type="button"   onclick="ReportRet('{$data.ybid}')"><span class="am-icon-trash-o"></span>重新生成</button>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            {/volist}
                            {/empty}
                            </tbody>
                        </table>
                        <hr>
                    </form>
                </div>
            </div>
        </div>
        <div class="tpl-alert"></div>
    </div>
    {include file="public/footer"/}


    <script>

        //信息编辑
        window.ModifyBlReportByYbid=function(ybid){
            location.href = '/index.php/index/report/EditBlReportYbid?ybid='+ybid;
        }

        /**
         * 报告修改页面js  重新生成报告单
         * @author singwa
         */

        function ReportRet(ybid) {


            var url = "/index.php/index/report/ReportRet";
            var data = {'ybid':ybid};
            // 执行异步请求  $.post
            $.post(url,data,function(result){
                if(result.status == 0) {
                    return dialog.error(result.message);
                }
                if(result.status == 1) {
                    /* return dialog.success(result.message, '/index.php/index/index/index');*/

                    return  dialog.full(result.message);
                }

            },'JSON');
        }


    </script>